const path = require("path");
const { merge } = require("webpack-merge");
const baseConfig = require("./webpack.config");
const webpackCommonRules = require("./webpack.rules.common");
const devConfig = merge(baseConfig, {
  mode: "development",
  devtool: "eval-cheap-module-source-map", // 源码调试模式,后面会讲
  devServer: {
    historyApiFallback: true,
    // contentBase: path.join(__dirname, "./dist"),
    open: false,
    hot: true,
    // quiet: true,
    port: 3001,
    static: {
      directory: path.join(__dirname, "../public"), //托管静态资源public文件夹
    },
    // allowedHosts:[], // 系统允许服务器白名单
    client: {
      progress: true,
    },
  },
});
// console.log("devConfig,", devConfig);
module.exports = devConfig;
